<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{wc:if isset($title)}{wc:$title}{wc:else}{wc:fun:_cfg("web_name")}{wc:if:end}</title>
<meta name="keywords" content="{wc:if isset($keywords)}{wc:$keywords}{wc:else}{wc:fun:_cfg("web_key")}{wc:if:end}" />
<meta name="description" content="{wc:if isset($description)}{wc:$description}{wc:else}{wc:fun:_cfg("web_des")}{wc:if:end}" />
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_CSS}/Comm.css"/>
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_CSS}/register.css"/>
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_CSS}/yj_index_header.css"/>

<script type="text/javascript" src="{G_GLOBAL_STYLE}/global/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="{G_TEMPLATES_JS}/jquery.cookie.js"></script>

</head>
<body>
<style>  
 .g-snow-con {
position: relative;
top: 130px;
z-index: 1001;
margin-bottom: -30px;
}
.g-snow {
background: url({G_UPLOAD_PATH}/banner/snow.png?v=141217) center no-repeat;
height: 30px;
_width: 1211px;
_margin: 0 auto;
}
.g-snow2 {
background: url({G_UPLOAD_PATH}/banner/snow2.png?v=141217) center no-repeat;
height: 30px;
_width: 1012px;
_margin: 0 auto;
display: none;
} 
.d {
 top: 0px;
 margin-top: 0px;
 padding-top:0px;
 margin-right: auto;
 margin-bottom: 0;
 margin-left: auto;
 background-image: url({G_UPLOAD_PATH}/banner/bg_2015.gif);
 background-repeat: no-repeat;
 background-position: center top; 
}
/*yjmp css start*/
.yj-cat{
	height: 44px;overflow: hidden;position: relative;margin: 0 15px;border-bottom: 1px solid #efefef;
}
.yj-cat span{
	display: block;height: 43px;line-height: 43px;position: relative;float: left;
}
.yj-cat-b{
	font-weight: bold;color: #333;font-size: 14px;margin-right: 12px;
}
.yj-cat-n{
	color: #999;font-size: 12px;white-space: nowrap;margin-right: 12px;
}
/*yjmp css end*/
</style>

<div class="header">
<!-- 新版头部 start yjmp -->
<div class="yj_head_bg">
	<div class="yj_1190">
		<ul class="yj_fl">
			<li>
				<div class="yj-menu-hd"><a href="javascript:;" id="addSiteFavorite">收藏</a></div>
			</li>
			<li>
				<s class="yj-s"></s>
			</li>
			<li style="display: none;">
				<a href="http://search.cctv.com/search.php?qtext=1%E5%85%83%E4%BA%91%E8%B4%AD&type=web" class="ccav-a">
					<img src="http://skin.1yyg.net/images/cctv-icon.jpg" class="ccav" width="80" height="35">
					<span>广告合作伙伴</span>
				</a>
			</li>
		</ul>
		<ul class="yj_fr">
		{wc:if get_user_arr()}
			<li class="h_wel" id="logininfo">
				<a href="{WEB_PATH}/member/home" class="gray01" style="color: #2af;">					
					<img src="{G_UPLOAD_PATH}/{wc:fun:get_user_img('3030')}" style="height: 20px;width: 20px;position: relative;top: 5px;border-radius: 10px;"/>					
					{wc:fun:get_user_name(get_user_arr(),'username')}
				</a>
				<a href="{WEB_PATH}/member/user/cook_end" class="gray01">[退出]</a>
			</li>
		{wc:else}
			<li>
				<div class="yj_menu">
					<a href="{WEB_PATH}/login">登录</a>
				</div>
			</li>
			<li>
				<s class="yj-s"></s>
			</li>
			<li>
				<div class="yj_menu">
					<a href="{WEB_PATH}/register">注册</a>
				</div>
			</li>
			<li>
				<s class="yj-s"></s>
			</li>
		{wc:if:end}
			<li>
				<li class="h_1yyg" style="padding: 0 15px 0 10px;">
				<a  href="{WEB_PATH}/home/home">我的阳光账户<b style="background-position: 5px -74px;margin-top: 3px;"></b></a>
				<div class="h_1yyg_eject" style="display:none;">
					<dl>
						<dt><a  href="{WEB_PATH}/member/home">我的阳光账户<i></i></a></dt>
						<dd><a  href="{WEB_PATH}/member/home/userbuylist">云购记录</a></dd>
						<dd><a  href="{WEB_PATH}/member/home/orderlist">获得的商品</a></dd>
						<!-- <dd><a  href="{WEB_PATH}/member/home/userrecharge">帐户充值</a></dd> -->
						<dd><a  href="{WEB_PATH}/member/home/modify">个人设置</a></dd>
					</dl>
				</div>
			</li>
			</li>
			<li>
				<s class="yj-s"></s>
			</li>
			<li>
				<div class="yj_menu" style="padding-left: 22px;">
					<i class="yj_i"></i>
					<a href="{WEB_PATH}/mobile/mobile">手机商城</a>
				</div>
			</li>
			<li>
				<s class="yj-s"></s>
			</li>
			<!-- <li>
				<div class="yj_menu">
					<a href="{WEB_PATH}/member/home/userrecharge">充值</a>
				</div>
			</li> -->
			<li>
				<s class="yj-s"></s>
			</li>
			<li>
				<div class="yj_menu">
					<a href="{WEB_PATH}/help/1">帮助</a>
				</div>
			</li>
			<li>
				<s class="yj-s"></s>
			</li>
			<li>
				<div class="yj_menu">
					<a href="{WEB_PATH}/help/13">投诉</a>
				</div>
			</li>
			<li>
				<s class="yj-s"></s>
			</li>
			<li>
				<div class="yj_menu">
					<i class="yj_i_server"></i>
					<a href="http://wpa.qq.com/msgrd?v=3&uin={wc:fun:_cfg("qq")}&site=qq&menu=yes" style="color: #f60;">在线客服</a>
				</div>
			</li>
		</ul>
	</div>
</div>
<!-- 新版头部 end yjmp -->
	<div class="head_mid">
		<div class="head_mid_bg">			
			<h1 class="logo_1yyg">
				<a class="logo_1yyg_img" href="{G_WEB_PATH}/" title="{wc:fun:_cfg('web_name')}">
					<img src="{G_UPLOAD_PATH}/{wc:fun:Getlogo()}"/>
				</a>
			</h1>			
			<div class="head_search" style="margin-top: 25px;width: 305px;">
				<input type="text" id="txtSearch" class="init" value='输入"红米手机"试一试' style="height: 36px;width: 145px;" />
				<span class="yj_search_span" id="yj_search_span">
					<a href="{WEB_PATH}/s_tag/苹果" target="_blank">苹果</a>
					<a href="{WEB_PATH}/s_tag/宝马" target="_blank">宝马</a>
					<a href="{WEB_PATH}/s_tag/单反" target="_blank">单反</a> 
				</span>
				<input type="button" id="butSearch" class="search_submit" value="搜索" style="height: 38px;background:url(images/yj_search_btn.png)repeat-x 4px 0;" />
				<div class="keySearch">                
				</div>
			</div>
			<div class="head_number" style="margin: 37px 188px 0 27px;">
			<div class="m-joinNum r">
					<a href="{WEB_PATH}/buyrecord" target="_blank">
						<span class="qian text" style="color: #666;">已揭晓商品</span>
						{wc:php:start}
						$q_rc=go_count_renci();
						$q_rc_num = strlen(go_count_renci());
						$q_rc_num_arr = array();
						for($q_i=0;$q_i < $q_rc_num;$q_i++){	
							$q_rc_num_arr[$q_i] = substr($q_rc,$q_i,1);
						}
						{wc:php:end}
						{wc:loop $q_rc_num_arr  $q_rc_numc}
						<span class="tnum" id="spBuyCount" style="border:1px solid #e4e4e4;background: none;margin-left: 2px;" >{wc:$q_rc_numc}</span>	
						{wc:loop:end}
						<span class="hou text" style="color: #666;">个 ></span>
					</a>
				</div>			
			</div>
		</div>
	</div>
</div>
<!--header end-->
<div class="head_nav" id="head_nav">
 	<div class="nav_center">
	<!--左部导航-->
		<div class="m_menu">
			<div class="m_menu_all">
                 <h3><a href="{WEB_PATH}/goods_list/">全部商品分类</a><em></em></h3>
             </div>
			 <div class="m_all_sort"  style="{wc:if isset($isindex) && $isindex=='Y'}display:block;{wc:else}display:none;{wc:if:end}">
			 <ul style="overflow: hidden;">				 
			{wc:php:start}
			$this->db=System::load_sys_class('model');
			$left_navigation=$this->db->GetList("select cateid,parentid,name from `@#_category` where `model` = '1' and `parentid` = '0' order by `order` DESC");				
			$url_left='';	
				foreach($left_navigation as $v){
					$cidleft=$v['cateid'];
					$url_left.='<li class="yj-cat">';	
					$url_left.='<span><a class="yj-cat-b" href="'.WEB_PATH.'/goods_list/'.$v['cateid'].'_0_0">'.$v['name'].'</a></span>';
					$brandleft=$this->db->GetList("select id,cateid,name from `@#_brand` where  CONCAT(',',`cateid`,',') LIKE '%,$cidleft,%' order by `order` DESC limit 5"); 
					
					foreach($brandleft as $v){				  
					$url_left.='<span><a class="yj-cat-n" href="'.WEB_PATH.'/goods_list/'.$cidleft.'_'.$v['id'].'_0">'.$v['name'].'</a></span>';
					}
					$url_left.='</li>';
				}
			echo  $url_left;	
			{wc:php:end}
			</ul>
            </div>

		</div>
	<!--上部导航-->	
		 <ul class="nav_list">
		  <li class="sort-all-shouye" ><a style="background: #FF4800;" href="{wc:G_WEB_PATH}">首页</a></li>
			{wc:fun:Getheader('index')}
 		</ul>	 
		<div class="mini_mycart" id="sCart">
 			<a rel="nofollow" href="{WEB_PATH}/member/cart/cartlist" id="sCartNavi" class="cart"><s></s>购物车(<span id="sCartTotal">0</span>)</a>
 			<div class="mycart_list" id="sCartlist" style="z-index: 99999; display: none;">
				
 				<div class="goods_loding" id="sCartLoading" style="display: none;"><img border="0" alt="" src="{G_TEMPLATES_STYLE}/images/goods_loading.gif">正在加载......</div>
 				<p id="p1">共计 <span id="sCartTotal2">0</span> 件商品 金额总计：<span id="sCartTotalM" class="rmbred">5.00</span></p>
 				<h3><input type="button" id="sGotoCart" value="去购物车并结算"></h3>
 			</div>
 		</div>
 	</div>
</div>
<script>
$(function(){
	// $("#sCart").hover(
	// 	function(){			
	// 		$("#sCartlist,#sCartLoading").show();
	// 		$("#sCartlist p,#sCartlist h3").hide();
	// 		$("#sCart .mycartcur").remove();
	// 		$("#sCartTotal2").html("");
	// 		$("#sCartTotalM").html("");
	// 		$.getJSON("{WEB_PATH}/member/cart/cartheader/="+ new Date().getTime(),function(data){
	// 			$("#sCart .mycartcur").remove();
	// 			$("#sCartLoading").before(data.li);
	// 			//浏览器兼容20150116ghm
	// 			$("#sCartTotal2").html(data.num);
	// 			if(data.sum=='0.00'){
	// 			if(data.num=='1'){
	// 			$("#sCartTotal2").html(data.num-1);
	// 			}else{
	// 			$("#sCartTotal2").html(data.num);
	// 			}
	// 			}else{
	// 			$("#sCartTotal2").html(data.num);
	// 			}
	// 			//浏览器兼容20150116ghm		
	// 			$("#sCartTotalM").html(data.sum);
	// 			$("#sCartLoading").hide();
	// 			$("#sCartlist p,#sCartlist h3").show();
	// 		});
	// 	},
	// 	function(){
	// 		$("#sCartlist").hide();
	// 	}
	// );
	$("#sGotoCart").click(function(){
		window.location.href="{WEB_PATH}/member/cart/cartlist";
	});
})
function delheader(id){
	var Cartlist = $.cookie('Cartlist');
	var info = $.evalJSON(Cartlist);
	var num=$("#sCartTotal2").html()-1;
	var sum=$("#sCartTotalM").html();
	info['MoenyCount'] = sum-info[id]['money']*info[id]['num'];
		
	delete info[id];
	//$.cookie('Cartlist','',{path:'/'});
	$.cookie('Cartlist',$.toJSON(info),{expires:30,path:'/'});
	$("#sCartTotalM").html(info['MoenyCount']);
	$('#sCartTotal2').html(num);
	$('#sCartTotal').text(num);										
	$('#btnMyCart em').text(num);
	$("#mycartcur"+id).remove();
}
$(function(){
	$(".h_1yyg").mouseover(function(){
		$(".h_1yyg_eject").show();
	});
	$(".h_1yyg").mouseout(function(){
		$(".h_1yyg_eject").hide();
	});
	$(".h_news").mouseover(function(){
		$(".h_news_down").show();
	});
	$(".h_news").mouseout(function(){
		$(".h_news_down").hide();
	});
});
$(function(){
	$("#txtSearch").focus(function(){
		$("#txtSearch").css({background:"#FFFFCC"});
		$("#txtSearch").css({width:"257px"});
		$("#yj_search_span").css({display:"none"});
		var va1=$("#txtSearch").val();
		if(va1=='输入"红米手机"试一试'){
			$("#txtSearch").val("");
		}
	});
	$("#txtSearch").blur(function(){
		$("#txtSearch").css({background:"#FFF"});
		$("#txtSearch").css({width:"145px"});
		$("#yj_search_span").css({display:"block"});
		var va2=$("#txtSearch").val();
		if(va2==""){
			$("#txtSearch").val('输入"红米手机"试一试');
		}			
	});
	$("#butSearch").click(function(){
		window.location.href="{WEB_PATH}/s_tag/"+$("#txtSearch").val();
	});
});

{wc:if !isset($isindex) || $isindex!='Y'}
      $(".m_menu_all").mouseover(function(){
		    $(".m_all_sort").show();
    })
	 $(".m_menu_all").mouseout(function(){
		setTimeout($(".m_all_sort").hide(),8000);     
    })
	 $(".m_all_sort").mouseover(function(){
		    $(".m_all_sort").show();
    })
	 $(".m_all_sort").mouseout(function(){
		    $(".m_all_sort").hide();
    })
	{wc:if:end}

</script>